import { getCategory } from "@/network/api/news.js";
import { reactive } from "@vue/composition-api";

export function common() {
  const categoryItem = reactive({
    item: []
  });

  const getInfoCategory = () => {
    getCategory().then(result => {
      let res = result.data;
      if (res.resCode == 0) {
        categoryItem.item = res.data.data;
      }
    });
  };
  return {
    getInfoCategory,
    categoryItem
  };
}
